package boot.spring.设计模式.访问者;

import boot.spring.设计模式.访问者.被访问者.Article;
import boot.spring.设计模式.访问者.被访问者.Book;
import boot.spring.设计模式.访问者.访问者.LibrarySumPrinterVisitor;

public class LibraryVisitorDemo {

    public static void main(String[] args) {

        Book book = new Book();
        Article article = new Article();

        LibrarySumPrinterVisitor visitor = new LibrarySumPrinterVisitor();
        //  visitor.visitor(book);
       visitor.visitor(article);
        visitor.printNum();
    }
}
